<!-- HTML header for doxygen 1.8.3.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Sifteo SDK: time.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-style-overrides.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<center>
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Sifteo SDK" src="sdk_logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">
   &#160;<span id="projectnumber">v1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
</center>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Home</span></a></li>
      <li><a href="pages.html"><span>Guides</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_12cda917fe1d7c8b4e7d2501bb3636e4.html">sdk</a></li><li class="navelem"><a class="el" href="dir_2f23e30b638d6a5f333babd9a5d183e1.html">include</a></li><li class="navelem"><a class="el" href="dir_d5ace589187da7c83c1a7507ec9fbbef.html">sifteo</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">time.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* -*- mode: C; c-basic-offset: 4; intent-tabs-mode: nil -*-</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * This file is part of the public interface to the Sifteo SDK.</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Copyright &lt;c&gt; 2012 Sifteo, Inc. All rights reserved.</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#ifdef NOT_USERSPACE</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#   error This is a userspace-only header, not allowed by the current build.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;sifteo/macros.h&gt;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;sifteo/abi.h&gt;</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="keyword">namespace </span>Sifteo {</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="keyword">class </span>SystemTime;</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_time_delta.html">   39</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a> {</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_time_delta.html#a0d43fed7065286e7022986ab94c3b73d">   48</a></span>&#160;    <a class="code" href="class_sifteo_1_1_time_delta.html#a0d43fed7065286e7022986ab94c3b73d" title="Construct a new TimeDelta from a floating point time, in seconds.">TimeDelta</a>(<span class="keywordtype">float</span> sec) : mMilli(sec * 1e3) {}</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <a class="code" href="class_sifteo_1_1_time_delta.html#a0d43fed7065286e7022986ab94c3b73d" title="Construct a new TimeDelta from a floating point time, in seconds.">TimeDelta</a>(<span class="keywordtype">double</span> sec) : mMilli(sec * 1e3) {}</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_time_delta.html#a8e4f14ebcc8b25a68fe7b3d3a130fe0e">   58</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a> <a class="code" href="class_sifteo_1_1_time_delta.html#a8e4f14ebcc8b25a68fe7b3d3a130fe0e" title="Construct a TimeDelta representing the period which corresponds with a given frequency.">hz</a>(<span class="keywordtype">float</span> h) {</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_time_delta.html#a0d43fed7065286e7022986ab94c3b73d" title="Construct a new TimeDelta from a floating point time, in seconds.">TimeDelta</a>(1.0f / h);</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    }</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_time_delta.html#ade74c99a058eff9a6ac11cf7201f5812">   65</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a> <a class="code" href="class_sifteo_1_1_time_delta.html#ade74c99a058eff9a6ac11cf7201f5812" title="Construct a new TimeDelta from an integer time, in milliseconds.">fromMillisec</a>(int32_t m) {</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_time_delta.html#a0d43fed7065286e7022986ab94c3b73d" title="Construct a new TimeDelta from a floating point time, in seconds.">TimeDelta</a>(m);</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    }</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;</div>
<div class="line"><a name="l00072"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_time_delta.html#a95f392559b8375a0c60c75febcc92ecc">   72</a></span>&#160;    int32_t <a class="code" href="class_sifteo_1_1_time_delta.html#a95f392559b8375a0c60c75febcc92ecc" title="Return the delta in milliseconds.">milliseconds</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        <span class="keywordflow">return</span> mMilli;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    }</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div>
<div class="line"><a name="l00079"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_time_delta.html#a04f4551d0b70ac9c8ef0928c629ffba2">   79</a></span>&#160;    int64_t <a class="code" href="class_sifteo_1_1_time_delta.html#a04f4551d0b70ac9c8ef0928c629ffba2" title="Return the delta in nanoseconds.">nanoseconds</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        <span class="keywordflow">return</span> mMilli * (int64_t)1000000;</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    }</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_time_delta.html#a54c55623a3481d1bd98cebd140e6be11">   86</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="class_sifteo_1_1_time_delta.html#a54c55623a3481d1bd98cebd140e6be11" title="Return the delta in seconds, as a floating point value.">seconds</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        <span class="keywordflow">return</span> mMilli * 1e-3;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    }</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    </div>
<div class="line"><a name="l00103"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_time_delta.html#ab527a1b29c8d05c27ad072e0da80e00a">  103</a></span>&#160;    <span class="keywordtype">unsigned</span> <a class="code" href="class_sifteo_1_1_time_delta.html#ab527a1b29c8d05c27ad072e0da80e00a" title="Return the number of frames, of a particular duration, that are represented by this time delta...">frames</a>(<a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a> duration)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(!<a class="code" href="class_sifteo_1_1_time_delta.html#a515380afeb634d26e331cef379007093" title="Is this time value negative?">isNegative</a>());</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(duration.<a class="code" href="class_sifteo_1_1_time_delta.html#ab037377902a34d297dba5662e1526de2" title="Is this time value positive?">isPositive</a>());</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        <span class="keywordflow">return</span> mMilli / duration.mMilli;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    }</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div>
<div class="line"><a name="l00123"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_time_delta.html#acb4e39461ada764aae5b341c495db9ff">  123</a></span>&#160;    <span class="keywordtype">unsigned</span> <a class="code" href="class_sifteo_1_1_time_delta.html#acb4e39461ada764aae5b341c495db9ff" title="Return a frame count, and subtract (pull) the time corresponding with those frames from this TimeDelt...">pullFrames</a>(<a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a> duration) {</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;        <span class="keywordtype">unsigned</span> f = <a class="code" href="class_sifteo_1_1_time_delta.html#ab527a1b29c8d05c27ad072e0da80e00a" title="Return the number of frames, of a particular duration, that are represented by this time delta...">frames</a>(duration);</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;        <span class="comment">// Could be &quot;*this -= duration * f&quot;, but operator* isn&#39;t defined yet.</span></div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;        mMilli -= duration.mMilli * f;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        <span class="keywordflow">return</span> f;</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    } </div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    </div>
<div class="line"><a name="l00136"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_time_delta.html#a515380afeb634d26e331cef379007093">  136</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_sifteo_1_1_time_delta.html#a515380afeb634d26e331cef379007093" title="Is this time value negative?">isNegative</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        <span class="keywordflow">return</span> mMilli &lt; 0;</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    }</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    </div>
<div class="line"><a name="l00141"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_time_delta.html#ab037377902a34d297dba5662e1526de2">  141</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_sifteo_1_1_time_delta.html#ab037377902a34d297dba5662e1526de2" title="Is this time value positive?">isPositive</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;        <span class="keywordflow">return</span> mMilli &gt; 0;</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    }</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div>
<div class="line"><a name="l00146"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_time_delta.html#a42a2b963fc435bbb7e64ac5e7fee254c">  146</a></span>&#160;    <span class="keyword">operator</span> float()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_time_delta.html#a54c55623a3481d1bd98cebd140e6be11" title="Return the delta in seconds, as a floating point value.">seconds</a>(); }</div>
<div class="line"><a name="l00148"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_time_delta.html#af8770f74d8edb37ae2a8876942728654">  148</a></span>&#160;    <span class="keyword">operator</span> double()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_time_delta.html#a54c55623a3481d1bd98cebd140e6be11" title="Return the delta in seconds, as a floating point value.">seconds</a>(); }</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    <span class="comment">// Accumulate time from another TimeDelta</span></div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    <a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a> operator+= (<a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a> b) { mMilli += b.mMilli; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    <span class="comment">// Accumulate negative time from another TimeDelta</span></div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    <a class="code" href="class_sifteo_1_1_time_delta.html#a0d43fed7065286e7022986ab94c3b73d" title="Construct a new TimeDelta from a floating point time, in seconds.">TimeDelta</a> operator-= (<a class="code" href="class_sifteo_1_1_time_delta.html#a0d43fed7065286e7022986ab94c3b73d" title="Construct a new TimeDelta from a floating point time, in seconds.">TimeDelta</a> b) { mMilli -= b.mMilli; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <span class="keyword">friend</span> <span class="keyword">class </span>SystemTime;</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <a class="code" href="class_sifteo_1_1_time_delta.html#a0d43fed7065286e7022986ab94c3b73d" title="Construct a new TimeDelta from a floating point time, in seconds.">TimeDelta</a>(int32_t m) : mMilli(m) {}</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    int32_t mMilli;</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;};</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator== (TimeDelta a, TimeDelta b) { <span class="keywordflow">return</span> a.milliseconds() == b.milliseconds(); }</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!= (TimeDelta a, TimeDelta b) { <span class="keywordflow">return</span> a.milliseconds() != b.milliseconds(); }</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&lt;  (TimeDelta a, TimeDelta b) { <span class="keywordflow">return</span> a.milliseconds() &lt;  b.milliseconds(); }</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&gt;  (TimeDelta a, TimeDelta b) { <span class="keywordflow">return</span> a.milliseconds() &gt;  b.milliseconds(); }</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&lt;= (TimeDelta a, TimeDelta b) { <span class="keywordflow">return</span> a.milliseconds() &lt;= b.milliseconds(); }</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&gt;= (TimeDelta a, TimeDelta b) { <span class="keywordflow">return</span> a.milliseconds() &gt;= b.milliseconds(); }</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator== (TimeDelta a, <span class="keywordtype">float</span> b) { <span class="keywordflow">return</span> a.milliseconds() == TimeDelta(b).milliseconds(); }</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!= (TimeDelta a, <span class="keywordtype">float</span> b) { <span class="keywordflow">return</span> a.milliseconds() != TimeDelta(b).milliseconds(); }</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&lt;  (TimeDelta a, <span class="keywordtype">float</span> b) { <span class="keywordflow">return</span> a.milliseconds() &lt;  TimeDelta(b).milliseconds(); }</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&gt;  (TimeDelta a, <span class="keywordtype">float</span> b) { <span class="keywordflow">return</span> a.milliseconds() &gt;  TimeDelta(b).milliseconds(); }</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&lt;= (TimeDelta a, <span class="keywordtype">float</span> b) { <span class="keywordflow">return</span> a.milliseconds() &lt;= TimeDelta(b).milliseconds(); }</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&gt;= (TimeDelta a, <span class="keywordtype">float</span> b) { <span class="keywordflow">return</span> a.milliseconds() &gt;= TimeDelta(b).milliseconds(); }</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator== (<span class="keywordtype">float</span> a, TimeDelta b) { <span class="keywordflow">return</span> TimeDelta(a).milliseconds() == b.milliseconds(); }</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!= (<span class="keywordtype">float</span> a, TimeDelta b) { <span class="keywordflow">return</span> TimeDelta(a).milliseconds() != b.milliseconds(); }</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&lt;  (<span class="keywordtype">float</span> a, TimeDelta b) { <span class="keywordflow">return</span> TimeDelta(a).milliseconds() &lt;  b.milliseconds(); }</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&gt;  (<span class="keywordtype">float</span> a, TimeDelta b) { <span class="keywordflow">return</span> TimeDelta(a).milliseconds() &gt;  b.milliseconds(); }</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&lt;= (<span class="keywordtype">float</span> a, TimeDelta b) { <span class="keywordflow">return</span> TimeDelta(a).milliseconds() &lt;= b.milliseconds(); }</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&gt;= (<span class="keywordtype">float</span> a, TimeDelta b) { <span class="keywordflow">return</span> TimeDelta(a).milliseconds() &gt;= b.milliseconds(); }</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator== (TimeDelta a, <span class="keywordtype">double</span> b) { <span class="keywordflow">return</span> a.milliseconds() == TimeDelta(b).milliseconds(); }</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!= (TimeDelta a, <span class="keywordtype">double</span> b) { <span class="keywordflow">return</span> a.milliseconds() != TimeDelta(b).milliseconds(); }</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&lt;  (TimeDelta a, <span class="keywordtype">double</span> b) { <span class="keywordflow">return</span> a.milliseconds() &lt;  TimeDelta(b).milliseconds(); }</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&gt;  (TimeDelta a, <span class="keywordtype">double</span> b) { <span class="keywordflow">return</span> a.milliseconds() &gt;  TimeDelta(b).milliseconds(); }</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&lt;= (TimeDelta a, <span class="keywordtype">double</span> b) { <span class="keywordflow">return</span> a.milliseconds() &lt;= TimeDelta(b).milliseconds(); }</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&gt;= (TimeDelta a, <span class="keywordtype">double</span> b) { <span class="keywordflow">return</span> a.milliseconds() &gt;= TimeDelta(b).milliseconds(); }</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator== (<span class="keywordtype">double</span> a, TimeDelta b) { <span class="keywordflow">return</span> TimeDelta(a).milliseconds() == b.milliseconds(); }</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!= (<span class="keywordtype">double</span> a, TimeDelta b) { <span class="keywordflow">return</span> TimeDelta(a).milliseconds() != b.milliseconds(); }</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&lt;  (<span class="keywordtype">double</span> a, TimeDelta b) { <span class="keywordflow">return</span> TimeDelta(a).milliseconds() &lt;  b.milliseconds(); }</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&gt;  (<span class="keywordtype">double</span> a, TimeDelta b) { <span class="keywordflow">return</span> TimeDelta(a).milliseconds() &gt;  b.milliseconds(); }</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&lt;= (<span class="keywordtype">double</span> a, TimeDelta b) { <span class="keywordflow">return</span> TimeDelta(a).milliseconds() &lt;= b.milliseconds(); }</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&gt;= (<span class="keywordtype">double</span> a, TimeDelta b) { <span class="keywordflow">return</span> TimeDelta(a).milliseconds() &gt;= b.milliseconds(); }</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;<span class="keyword">inline</span> TimeDelta operator+ (TimeDelta a, TimeDelta b) { <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_time_delta.html#ade74c99a058eff9a6ac11cf7201f5812" title="Construct a new TimeDelta from an integer time, in milliseconds.">TimeDelta::fromMillisec</a>(a.milliseconds() + b.milliseconds()); }</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;<span class="keyword">inline</span> TimeDelta operator- (TimeDelta a, TimeDelta b) { <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_time_delta.html#ade74c99a058eff9a6ac11cf7201f5812" title="Construct a new TimeDelta from an integer time, in milliseconds.">TimeDelta::fromMillisec</a>(a.milliseconds() - b.milliseconds()); }</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;<span class="keyword">inline</span> TimeDelta operator* (TimeDelta a, <span class="keywordtype">float</span> b)    { <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_time_delta.html#ade74c99a058eff9a6ac11cf7201f5812" title="Construct a new TimeDelta from an integer time, in milliseconds.">TimeDelta::fromMillisec</a>(a.milliseconds() * b); }</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;<span class="keyword">inline</span> TimeDelta operator* (TimeDelta a, <span class="keywordtype">double</span> b)   { <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_time_delta.html#ade74c99a058eff9a6ac11cf7201f5812" title="Construct a new TimeDelta from an integer time, in milliseconds.">TimeDelta::fromMillisec</a>(a.milliseconds() * b); }</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;<span class="keyword">inline</span> TimeDelta operator* (TimeDelta a, <span class="keywordtype">int</span> b)      { <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_time_delta.html#ade74c99a058eff9a6ac11cf7201f5812" title="Construct a new TimeDelta from an integer time, in milliseconds.">TimeDelta::fromMillisec</a>(a.milliseconds() * b); }</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;<span class="keyword">inline</span> TimeDelta operator* (TimeDelta a, <span class="keywordtype">unsigned</span> b) { <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_time_delta.html#ade74c99a058eff9a6ac11cf7201f5812" title="Construct a new TimeDelta from an integer time, in milliseconds.">TimeDelta::fromMillisec</a>(a.milliseconds() * b); }</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;<span class="keyword">inline</span> TimeDelta operator* (<span class="keywordtype">float</span> a,    TimeDelta b) { <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_time_delta.html#ade74c99a058eff9a6ac11cf7201f5812" title="Construct a new TimeDelta from an integer time, in milliseconds.">TimeDelta::fromMillisec</a>(b.milliseconds() * a); }</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;<span class="keyword">inline</span> TimeDelta operator* (<span class="keywordtype">double</span> a,   TimeDelta b) { <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_time_delta.html#ade74c99a058eff9a6ac11cf7201f5812" title="Construct a new TimeDelta from an integer time, in milliseconds.">TimeDelta::fromMillisec</a>(b.milliseconds() * a); }</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;<span class="keyword">inline</span> TimeDelta operator* (<span class="keywordtype">int</span> a,      TimeDelta b) { <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_time_delta.html#ade74c99a058eff9a6ac11cf7201f5812" title="Construct a new TimeDelta from an integer time, in milliseconds.">TimeDelta::fromMillisec</a>(b.milliseconds() * a); }</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;<span class="keyword">inline</span> TimeDelta operator* (<span class="keywordtype">unsigned</span> a, TimeDelta b) { <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_time_delta.html#ade74c99a058eff9a6ac11cf7201f5812" title="Construct a new TimeDelta from an integer time, in milliseconds.">TimeDelta::fromMillisec</a>(b.milliseconds() * a); }</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">float</span> operator+= (<span class="keywordtype">float</span> &amp;a, TimeDelta b) { <span class="keywordflow">return</span> a += b.<a class="code" href="class_sifteo_1_1_time_delta.html#a54c55623a3481d1bd98cebd140e6be11" title="Return the delta in seconds, as a floating point value.">seconds</a>(); }</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">float</span> operator-= (<span class="keywordtype">float</span> &amp;a, TimeDelta b) { <span class="keywordflow">return</span> a -= b.seconds(); }</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;</div>
<div class="line"><a name="l00237"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_system_time.html">  237</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_sifteo_1_1_system_time.html" title="Absolute time, measured by the system&#39;s monotonically increasing nanosecond timer.">SystemTime</a> {</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00245"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_system_time.html#a0b0d3d91fa929f26d8763b66abbb22d9">  245</a></span>&#160;    <a class="code" href="class_sifteo_1_1_system_time.html#a0b0d3d91fa929f26d8763b66abbb22d9" title="Creates an invalid SystemTime.">SystemTime</a>() : mTicks(0) {}</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;</div>
<div class="line"><a name="l00250"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_system_time.html#a818459cc9bf7c347d117f6b6d77104fd">  250</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="class_sifteo_1_1_system_time.html" title="Absolute time, measured by the system&#39;s monotonically increasing nanosecond timer.">SystemTime</a> <a class="code" href="class_sifteo_1_1_system_time.html#a818459cc9bf7c347d117f6b6d77104fd" title="Returns a new SystemTime representing the current system clock value.">now</a>() {</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_system_time.html#a0b0d3d91fa929f26d8763b66abbb22d9" title="Creates an invalid SystemTime.">SystemTime</a>(_SYS_ticks_ns());</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;    }</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;    </div>
<div class="line"><a name="l00260"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_system_time.html#ad1969c40a6fb2a9a6f831cecfad612d3">  260</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_sifteo_1_1_system_time.html#ad1969c40a6fb2a9a6f831cecfad612d3" title="Is this SystemTime valid?">isValid</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;        <span class="keywordflow">return</span> mTicks != 0;</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;    }</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;</div>
<div class="line"><a name="l00267"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_system_time.html#a4291960238bcbeadac5822bd37043f18">  267</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_sifteo_1_1_system_time.html#a4291960238bcbeadac5822bd37043f18" title="Is this time in the future?">inFuture</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;        <span class="keywordflow">return</span> mTicks &gt; <a class="code" href="class_sifteo_1_1_system_time.html#a818459cc9bf7c347d117f6b6d77104fd" title="Returns a new SystemTime representing the current system clock value.">now</a>().mTicks;</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;    }</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;</div>
<div class="line"><a name="l00274"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_system_time.html#a0cbdb7f7169b6ee78063c817e4b057ee">  274</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_sifteo_1_1_system_time.html#a0cbdb7f7169b6ee78063c817e4b057ee" title="Is this time in the past?">inPast</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;        <span class="keywordflow">return</span> mTicks &lt; <a class="code" href="class_sifteo_1_1_system_time.html#a818459cc9bf7c347d117f6b6d77104fd" title="Returns a new SystemTime representing the current system clock value.">now</a>().mTicks;</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;    }</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;</div>
<div class="line"><a name="l00281"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_system_time.html#ad7d61048b246377a6f89b436cce3f4f4">  281</a></span>&#160;    uint64_t <a class="code" href="class_sifteo_1_1_system_time.html#ad7d61048b246377a6f89b436cce3f4f4" title="Return the SystemTime as a count of nanoseconds since boot.">uptimeNS</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(<a class="code" href="class_sifteo_1_1_system_time.html#ad1969c40a6fb2a9a6f831cecfad612d3" title="Is this SystemTime valid?">isValid</a>());</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;        <span class="keywordflow">return</span> mTicks;</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    }</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;</div>
<div class="line"><a name="l00289"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_system_time.html#ad5a99a59881d5f740bb9378fa20606b9">  289</a></span>&#160;    uint64_t <a class="code" href="class_sifteo_1_1_system_time.html#ad5a99a59881d5f740bb9378fa20606b9" title="Return the SystemTime as a count of microseconds since boot.">uptimeUS</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(<a class="code" href="class_sifteo_1_1_system_time.html#ad1969c40a6fb2a9a6f831cecfad612d3" title="Is this SystemTime valid?">isValid</a>());</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;        <span class="keywordflow">return</span> mTicks / (uint64_t)1000;</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    }</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;</div>
<div class="line"><a name="l00297"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_system_time.html#a8d1e2d1b99fdcfa4e8feff975bee44b5">  297</a></span>&#160;    uint64_t <a class="code" href="class_sifteo_1_1_system_time.html#a8d1e2d1b99fdcfa4e8feff975bee44b5" title="Return the SystemTime as a count of milliseconds since boot.">uptimeMS</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(<a class="code" href="class_sifteo_1_1_system_time.html#ad1969c40a6fb2a9a6f831cecfad612d3" title="Is this SystemTime valid?">isValid</a>());</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;        <span class="keywordflow">return</span> mTicks / (uint64_t)1000000;</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;    }</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;</div>
<div class="line"><a name="l00306"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_system_time.html#a5bdbc1d315eab51d972892b83caab202">  306</a></span>&#160;    <span class="keywordtype">double</span> <a class="code" href="class_sifteo_1_1_system_time.html#a5bdbc1d315eab51d972892b83caab202" title="Return the SystemTime, in seconds since boot. Returns a double-precision floating point value...">uptime</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(<a class="code" href="class_sifteo_1_1_system_time.html#ad1969c40a6fb2a9a6f831cecfad612d3" title="Is this SystemTime valid?">isValid</a>());</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;        <span class="keywordflow">return</span> mTicks * 1e-9;</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;    }</div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;</div>
<div class="line"><a name="l00320"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_system_time.html#abaefbec5658a96456b3c8d916c0fc7b6">  320</a></span>&#160;    <a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a> <a class="code" href="class_sifteo_1_1_system_time.html#abaefbec5658a96456b3c8d916c0fc7b6" title="Measure the amount of time since the beginning of a repeating cycle with arbitrary phase and the spec...">cycleDelta</a>(<a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a> period)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(period.<a class="code" href="class_sifteo_1_1_time_delta.html#a95f392559b8375a0c60c75febcc92ecc" title="Return the delta in milliseconds.">milliseconds</a>() &gt; 0);</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a>((int32_t)(<a class="code" href="class_sifteo_1_1_system_time.html#a8d1e2d1b99fdcfa4e8feff975bee44b5" title="Return the SystemTime as a count of milliseconds since boot.">uptimeMS</a>() % (uint64_t)period.<a class="code" href="class_sifteo_1_1_time_delta.html#a95f392559b8375a0c60c75febcc92ecc" title="Return the delta in milliseconds.">milliseconds</a>()));</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;    }</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;</div>
<div class="line"><a name="l00330"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_system_time.html#a928c51ef072551517200db93eed3861b">  330</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="class_sifteo_1_1_system_time.html#a928c51ef072551517200db93eed3861b" title="Like cycleDelta(), but scales the result to the range [0,1], where 0 and 1 represent the beginning an...">cyclePhase</a>(<a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a> period)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_system_time.html#abaefbec5658a96456b3c8d916c0fc7b6" title="Measure the amount of time since the beginning of a repeating cycle with arbitrary phase and the spec...">cycleDelta</a>(period).<a class="code" href="class_sifteo_1_1_time_delta.html#a95f392559b8375a0c60c75febcc92ecc" title="Return the delta in milliseconds.">milliseconds</a>() / (float) period.<a class="code" href="class_sifteo_1_1_time_delta.html#a95f392559b8375a0c60c75febcc92ecc" title="Return the delta in milliseconds.">milliseconds</a>();</div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;    }</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;</div>
<div class="line"><a name="l00341"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_system_time.html#a3e743e672b5db8be5373d3a0413a8b91">  341</a></span>&#160;    <span class="keywordtype">unsigned</span> <a class="code" href="class_sifteo_1_1_system_time.html#a3e743e672b5db8be5373d3a0413a8b91" title="Like cycleDelta(), but scales the result to the range [0, frames-1].">cycleFrame</a>(<a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a> period, <span class="keywordtype">unsigned</span> frames)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_system_time.html#abaefbec5658a96456b3c8d916c0fc7b6" title="Measure the amount of time since the beginning of a repeating cycle with arbitrary phase and the spec...">cycleDelta</a>(period).<a class="code" href="class_sifteo_1_1_time_delta.html#a95f392559b8375a0c60c75febcc92ecc" title="Return the delta in milliseconds.">milliseconds</a>() * frames / period.<a class="code" href="class_sifteo_1_1_time_delta.html#a95f392559b8375a0c60c75febcc92ecc" title="Return the delta in milliseconds.">milliseconds</a>();</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;    }</div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;</div>
<div class="line"><a name="l00353"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_system_time.html#afd625c7574c8e626ea24ffbc6a98b3fd">  353</a></span>&#160;    <a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a> <a class="code" href="class_sifteo_1_1_system_time.html#afd625c7574c8e626ea24ffbc6a98b3fd" title="Subtract two SystemTimes, and return a 32-bit TimeDelta, with millisecond resolution.">operator- </a>(<a class="code" href="class_sifteo_1_1_system_time.html" title="Absolute time, measured by the system&#39;s monotonically increasing nanosecond timer.">SystemTime</a> b)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;        int64_t diff = <a class="code" href="class_sifteo_1_1_system_time.html#ad7d61048b246377a6f89b436cce3f4f4" title="Return the SystemTime as a count of nanoseconds since boot.">uptimeNS</a>() - b.<a class="code" href="class_sifteo_1_1_system_time.html#ad7d61048b246377a6f89b436cce3f4f4" title="Return the SystemTime as a count of nanoseconds since boot.">uptimeNS</a>();</div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a>((int32_t)(diff / 1000000));</div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;    }</div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;</div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;    <a class="code" href="class_sifteo_1_1_system_time.html" title="Absolute time, measured by the system&#39;s monotonically increasing nanosecond timer.">SystemTime</a> &amp;operator+= (<span class="keyword">const</span> <a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a> &amp;rhs) { mTicks += rhs.<a class="code" href="class_sifteo_1_1_time_delta.html#a04f4551d0b70ac9c8ef0928c629ffba2" title="Return the delta in nanoseconds.">nanoseconds</a>(); <span class="keywordflow">return</span> *<span class="keyword">this</span>; }</div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;    <a class="code" href="class_sifteo_1_1_system_time.html#a0b0d3d91fa929f26d8763b66abbb22d9" title="Creates an invalid SystemTime.">SystemTime</a> &amp;operator-= (<span class="keyword">const</span> TimeDelta &amp;rhs) { mTicks -= rhs.nanoseconds(); <span class="keywordflow">return</span> *<span class="keyword">this</span>; }</div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;</div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;    <a class="code" href="class_sifteo_1_1_system_time.html#a0b0d3d91fa929f26d8763b66abbb22d9" title="Creates an invalid SystemTime.">SystemTime</a> operator+ (TimeDelta b)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_system_time.html#a0b0d3d91fa929f26d8763b66abbb22d9" title="Creates an invalid SystemTime.">SystemTime</a>(mTicks + b.nanoseconds()); }</div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;    <a class="code" href="class_sifteo_1_1_system_time.html#a0b0d3d91fa929f26d8763b66abbb22d9" title="Creates an invalid SystemTime.">SystemTime</a> <a class="code" href="class_sifteo_1_1_system_time.html#afd625c7574c8e626ea24ffbc6a98b3fd" title="Subtract two SystemTimes, and return a 32-bit TimeDelta, with millisecond resolution.">operator- </a>(TimeDelta b)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="class_sifteo_1_1_system_time.html#a0b0d3d91fa929f26d8763b66abbb22d9" title="Creates an invalid SystemTime.">SystemTime</a>(mTicks - b.nanoseconds()); }</div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;</div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;    <a class="code" href="class_sifteo_1_1_system_time.html#a0b0d3d91fa929f26d8763b66abbb22d9" title="Creates an invalid SystemTime.">SystemTime</a>(uint64_t t) : mTicks(t) {}</div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;    uint64_t mTicks;</div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;};</div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;</div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator== (SystemTime a, SystemTime b) { <span class="keywordflow">return</span> a.uptimeNS() == b.uptimeNS(); }</div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!= (SystemTime a, SystemTime b) { <span class="keywordflow">return</span> a.uptimeNS() != b.uptimeNS(); }</div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&lt;  (SystemTime a, SystemTime b) { <span class="keywordflow">return</span> a.uptimeNS() &lt;  b.uptimeNS(); }</div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&gt;  (SystemTime a, SystemTime b) { <span class="keywordflow">return</span> a.uptimeNS() &gt;  b.uptimeNS(); }</div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&lt;= (SystemTime a, SystemTime b) { <span class="keywordflow">return</span> a.uptimeNS() &lt;= b.uptimeNS(); }</div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> operator&gt;= (SystemTime a, SystemTime b) { <span class="keywordflow">return</span> a.uptimeNS() &gt;= b.uptimeNS(); }</div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;</div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;<span class="keyword">inline</span> SystemTime operator+ (TimeDelta a, SystemTime b) { <span class="keywordflow">return</span> b + a; }</div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;<span class="keyword">inline</span> SystemTime operator- (TimeDelta a, SystemTime b) { <span class="keywordflow">return</span> b - a; }</div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;</div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;</div>
<div class="line"><a name="l00393"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_time_step.html">  393</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_sifteo_1_1_time_step.html" title="TimeStep is a higher-level utility for keeping track of time the duration of game timesteps...">TimeStep</a> {</div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;    <a class="code" href="class_sifteo_1_1_time_step.html" title="TimeStep is a higher-level utility for keeping track of time the duration of game timesteps...">TimeStep</a>() : mPrevTime(), mDelta(0.0) {}</div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;</div>
<div class="line"><a name="l00403"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_time_step.html#ad76c63357ff9e11ded68593a68349ab9">  403</a></span>&#160;    <a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a> <a class="code" href="class_sifteo_1_1_time_step.html#ad76c63357ff9e11ded68593a68349ab9" title="Retrieve the duration of the last time interval.">delta</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;        <span class="keywordflow">return</span> mDelta;</div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;    }</div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;</div>
<div class="line"><a name="l00414"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_time_step.html#a86fb7bd475ea8d265cb47a8e476e1740">  414</a></span>&#160;    <a class="code" href="class_sifteo_1_1_system_time.html" title="Absolute time, measured by the system&#39;s monotonically increasing nanosecond timer.">SystemTime</a> <a class="code" href="class_sifteo_1_1_time_step.html#a86fb7bd475ea8d265cb47a8e476e1740" title="Retrieve the SystemTime at the end of the interval described by delta().">end</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(mPrevTime.<a class="code" href="class_sifteo_1_1_system_time.html#ad1969c40a6fb2a9a6f831cecfad612d3" title="Is this SystemTime valid?">isValid</a>());</div>
<div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;        <span class="keywordflow">return</span> mPrevTime;</div>
<div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;    }</div>
<div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;</div>
<div class="line"><a name="l00426"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_time_step.html#a92f19ed64a68bbd94242712ea84c0882">  426</a></span>&#160;    <a class="code" href="class_sifteo_1_1_system_time.html" title="Absolute time, measured by the system&#39;s monotonically increasing nanosecond timer.">SystemTime</a> <a class="code" href="class_sifteo_1_1_time_step.html#a92f19ed64a68bbd94242712ea84c0882" title="Retrieve the SystemTime at the beginning of the interval described by delta().">begin</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(mDelta != <a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a>(0.0));</div>
<div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(mPrevTime.<a class="code" href="class_sifteo_1_1_system_time.html#ad1969c40a6fb2a9a6f831cecfad612d3" title="Is this SystemTime valid?">isValid</a>());</div>
<div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;        <span class="keywordflow">return</span> mPrevTime - mDelta;</div>
<div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;    }</div>
<div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;</div>
<div class="line"><a name="l00438"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_time_step.html#aa000cd63a3d51f49a188408716129525">  438</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_sifteo_1_1_time_step.html#aa000cd63a3d51f49a188408716129525" title="Advance to the next time interval.">next</a>() {</div>
<div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;        <a class="code" href="class_sifteo_1_1_system_time.html" title="Absolute time, measured by the system&#39;s monotonically increasing nanosecond timer.">SystemTime</a> now = <a class="code" href="class_sifteo_1_1_system_time.html#a818459cc9bf7c347d117f6b6d77104fd" title="Returns a new SystemTime representing the current system clock value.">SystemTime::now</a>();</div>
<div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;</div>
<div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;        <span class="keywordflow">if</span> (mPrevTime.<a class="code" href="class_sifteo_1_1_system_time.html#ad1969c40a6fb2a9a6f831cecfad612d3" title="Is this SystemTime valid?">isValid</a>()) {</div>
<div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;            <span class="comment">// This subtraction loses sub-millisecond precision.</span></div>
<div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;            <span class="comment">// We feed that error back into mPrevTime, so that it will</span></div>
<div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;            <span class="comment">// be corrected instead of amplified.</span></div>
<div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;</div>
<div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;            mDelta = now - mPrevTime;</div>
<div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;            mPrevTime += mDelta;</div>
<div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;            </div>
<div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;        } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;            <span class="comment">// Beginning of the very first timestep</span></div>
<div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;            mPrevTime = now;</div>
<div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;        }</div>
<div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;    }</div>
<div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;</div>
<div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;    <a class="code" href="class_sifteo_1_1_system_time.html" title="Absolute time, measured by the system&#39;s monotonically increasing nanosecond timer.">SystemTime</a> mPrevTime;</div>
<div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;    <a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a> mDelta;</div>
<div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;};</div>
<div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;</div>
<div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;</div>
<div class="line"><a name="l00476"></a><span class="lineno"><a class="code" href="class_sifteo_1_1_time_ticker.html">  476</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_sifteo_1_1_time_ticker.html" title="TimeTicker is a utility for converting a stream of time deltas into a stream of discrete ticks...">TimeTicker</a> {</div>
<div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;    <a class="code" href="class_sifteo_1_1_time_ticker.html" title="TimeTicker is a utility for converting a stream of time deltas into a stream of discrete ticks...">TimeTicker</a>() : mRemainder(0.0f), mPeriod(0.0) {}</div>
<div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;    <a class="code" href="class_sifteo_1_1_time_ticker.html" title="TimeTicker is a utility for converting a stream of time deltas into a stream of discrete ticks...">TimeTicker</a>(<span class="keywordtype">float</span> hz) : mRemainder(0.0f), mPeriod(<a class="code" href="class_sifteo_1_1_time_delta.html#a8e4f14ebcc8b25a68fe7b3d3a130fe0e" title="Construct a TimeDelta representing the period which corresponds with a given frequency.">TimeDelta::hz</a>(hz)) {}</div>
<div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;</div>
<div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;    <span class="keywordtype">void</span> setPeriod(<a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a> period) {</div>
<div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;        mPeriod = period;</div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;    }</div>
<div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;</div>
<div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;    <span class="keywordtype">void</span> setRate(<span class="keywordtype">float</span> hz) {</div>
<div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;        mPeriod = <a class="code" href="class_sifteo_1_1_time_delta.html#a8e4f14ebcc8b25a68fe7b3d3a130fe0e" title="Construct a TimeDelta representing the period which corresponds with a given frequency.">TimeDelta::hz</a>(hz);</div>
<div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;    }</div>
<div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;</div>
<div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;    <span class="keywordtype">unsigned</span> tick(<a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a> dt) {</div>
<div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;        <a class="code" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT</a>(!dt.<a class="code" href="class_sifteo_1_1_time_delta.html#a515380afeb634d26e331cef379007093" title="Is this time value negative?">isNegative</a>());</div>
<div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;        mRemainder += dt;</div>
<div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;        <span class="keywordflow">return</span> mRemainder.<a class="code" href="class_sifteo_1_1_time_delta.html#acb4e39461ada764aae5b341c495db9ff" title="Return a frame count, and subtract (pull) the time corresponding with those frames from this TimeDelt...">pullFrames</a>(mPeriod);</div>
<div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;    }</div>
<div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;    </div>
<div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;    <a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a> getPeriod()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;        <span class="keywordflow">return</span> mPeriod;</div>
<div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;    }</div>
<div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;    </div>
<div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;    <a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a> mRemainder;</div>
<div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;    <a class="code" href="class_sifteo_1_1_time_delta.html" title="Represents a difference between two SystemTimes, with moderate resolution.">TimeDelta</a> mPeriod;</div>
<div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;};</div>
<div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;</div>
<div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;}   <span class="comment">// namespace Sifteo</span></div>
<div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;</div>
</div><!-- fragment --></div><!-- contents -->
<!-- HTML footer for doxygen 1.8.3.1-->
<!-- start footer part -->
    <hr class="footer"/>
    <address class="footer">
        <p><a href="http://sifteo.com">Sifteo</a> SDK v1.0.0 <small>(see <a href="https://developers.sifteo.com/sifteosdk">all versions</a>)</small></p>
        <p>Last updated Wed Mar 27 2013, by <a href="http://www.stack.nl/~dimitri/doxygen">Doxygen</a></p>
    </address>
</body>
</html>
